package com.zaoqi.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping("/user") // ← 指定路径
public class UserController {

    @Value("${user.msg:默认配置}")
    private String msg;

    @GetMapping("/msg")
    public String getMsg() {
        return "用户服务配置：" + msg;
    }
}
